<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>通达网络办公系统</title>
<link href="<?php echo base_url()?>css/base.css" type="text/css" rel="stylesheet" />
<link href="<?php echo base_url()?>css/common.css" type="text/css" rel="stylesheet" />
<link href="<?php echo base_url()?>css/pages.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo base_url()?>js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="<?php echo base_url()?>js/Clock.js"></script>
<!--[if IE 6]><script type="text/javascript" src="js/pngfix.js"></script><![endif]-->
<script type="text/javascript" src="<?php echo base_url() ?>/js/menu.js"></script>

<script language="javascript">
function selsc()
{
	var objs   =   document.getElementsByName( 'did[]');
	for (var i=0;i<objs.length;i++) {
		var temp=objs[i];
		temp.checked=!temp.checked;
	}
}
$(function(){
	function del(id) {
		$.ajax({
			type: "POST",
			url: "<?php echo site_url('article/delartmain')?>/",
			data: "id="+id,
			success: function(msg){
				$("#tr"+id).fadeOut('slow');
			}
		}); 
	};
})
function   check(){
	var checkid = '';
	objs   =   document.getElementsByName( 'did[]');
	for(i=0;   i <objs.length;   i++)   {
		if(objs[i].checked   ==   true){
			checkid += objs[i].value+',';					    
		}  
	}
	if(checkid==''){
		alert( '请选择您要操作的选项！');
		return false;
	}else{
		return true;
	}
} 
</script>

</head>

<body>
<!-- OAindex{ -->
<div class="oaindex">
	<?php include 'system_header.php' ?>
    <div class="clearfix">
       <?php include 'system_left.php' ?>
        <!-- right_box{ -->
        <div class="right_box"><form id="abs" name="form1" action="/index.php/article/atricle_all_down/" method="post">
            <div class="the_current">
				<span></span>
				<p>当前位置：首页&nbsp&nbsp>>&nbsp&nbsp内容</p>
            </div>
			<!-- 表格内容{ -->
			<div class="sheet clearfix">
				<table width="740" border="0" cellspacing="0" cellpadding="0">
                 <tr>
                    <th width="32"><input  type="checkbox" onclick="selsc()" value="checkbox" /></th>
					<th width="44" ><img src="<?php echo base_url()?>images/on_read.jpg"><img src="<?php echo base_url()?>images/down_file.jpg"></th> 
                    <th width="301">标题</th>
					<th width="155">公文类型</th>
                    <th width="200">操作</th>
                  </tr>
				  <?php if(!empty($datas)){ foreach($datas as $item):?>
                  <tr id="tr<?php echo $item->id;?>">
                    <td><input name="did[]" type="checkbox" value="<?php echo $item->id;?>" /></td>  
					<td><?php if($item->read == 1){?><img src="<?php echo base_url()?>images/on_read.jpg"><?php }else{?><img src="<?php echo base_url()?>images/no_read.jpg"><?php }?><?php if($item->filepath){?><img src="<?php echo base_url()?>images/down_file.jpg"><?php }?></td>
                    <td><a href="/index.php/article/articlecontent/<?php echo $item->id;?>"><?php echo $item->title;?></a></td> 
					<td><?php echo $item->artitype;?></td>
                    <td class="handle"><!--<a href="javascript:del(<?php echo $item->id;?>)" onclick="javascript:return  confirm('是否将此留言信息删除?')">删除</a>--><?php if($item->filepath){?><a href="/index.php/article/atricle_down/<?php $arr = explode('/',$item->filepath);echo $arr[2];?>">下载附件</a><?php }?></td>
                  </tr>
				  
				<?php endforeach;}else{ ?> <tr align='center' bgcolor='#ffffff'><td colspan='3'>没有记录！</td></tr><?php }?>        
                </table>
                <p class="whol_button"><input name="" onclick="return check()" type="submit" value="批量下载" /><!--<input name="" type="button" value="批量删除" />--></p>

			</div>
			<!-- }表格内容 -->
            <p class="page"><?php echo $this->pager->page("article/articlelist",$current);?><!--<span>到</span><input type="text"/><span>页</span><input class="ok_button" type="button" value="确定" />--></p>
            </form>
        </div>
        <!-- }right_box -->
    </div>
   <?php include 'system_footer.php' ?>
</div>
<!-- }OAindex -->
</body>
</html>
